<fieldset
  class="schema-form-fieldset {{ form.htmlClass }}"
  ng-disabled="form.readonly"
  ng-init="collapsed = form.collapsed">
  <div class="panel panel-default deposit-panel">
    <div class="panel-heading" ng-click="collapsed = !collapsed">
      <a class="panel-toggle">
        {{ form.title }}
        <div
          class="tooltip-wrapper"
          ng-if="form.helptext"
          bs-tooltip
          data-container="div"
          data-title="{{form.helptext}}">
          <i class="fa fa-question-circle text-muted"></i>
        </div>
        <span class="pull-right" ng-show="collapsed"><i class="glyphicon glyphicon-chevron-right"></i></span>
        <span class="pull-right" ng-hide="collapsed"><i class="glyphicon glyphicon-chevron-down"></i></span>
      </a>
      <span class="fieldset-hint text-muted pull-right">{{ form.fieldhint || 'required' }}</span>
    </div>
    <div class="panel-body" ng-hide="collapsed">
      <p ng-if="form.description" ng-bind-html="form.description"></p>
      <sf-decorator ng-repeat="item in form.items" form="item"></sf-decorator>
    </div>
  </div>
</fieldset>
